package com.htn.common.core.constant;


import lombok.Getter;

/**
 * @author hongfei
 */
public class CommonConstants {

	public static final String BUCKET = "hsmw-tool-pic-1303885219";
	//微信发送服务信息的api地址
	public final static String WX_PUBLIC_URL = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send";

	//微信请求 ACCESS信息的api地址
	public final static String WX_ACCESS_URL = "https://api.weixin.qq.com/cgi-bin/token";

	//微信登录请求信息的api地址
	public final static String WX_LOGIN_URL = "https://api.weixin.qq.com/sns/jscode2session";
	public static final Object WX_FOREMAN_APPID = "wxb736c0b2dfe599d5";
	public static final Object WX_FOREMAN_APP_SECRET = "8ef6a47699ab71c1352162b10c2014d4";


	//阿里云 虚拟号码访问的域名
	public static final String ALIYUN_URL = "dyplsapi.aliyuncs.com";

	//阿里云虚拟号码 key
	public static final String ACCESSKEYID = "LTAI5tAaDAuL6aRzsLSA4Wcx";
	//阿里云虚拟号码 secret
	public static final String ACCESSKEYDECRET = "B2Engs16nqhRI6DwYzECPR3cP8wEIs";


	public static final String POOLKEY_1="FC100000132982365";


	public static final String ILLEGAL_ARGUMENT="isv.ILLEGAL_ARGUMENT";

	public static final Object WX_PM_APPID = "wx0f4fccaa518664ab";
	public static final Object WX_PM_APP_SECRET ="ecac3baec62eae324d34e1a683673275" ;


	/**
	 * 用户角色
	 */
	public enum UserRole {
		BIZ,
		FOREMAN,
		PM,
		DRIVER,
		UNKNOWN,
		CONCRETE,
		SALE,
		TPSP,
		SELFRUN,
		LEASINGCOM,
		VISITOR //游客 司机 + 工长 +项目经理 在未审核完以后
	}

	public static final String CONTEXT_KEY_USER_ID = "currentUserId";
	public static final String CONTEXT_KEY_IP = "currentIp";
	public static final String CONTEXT_KEY_USER_ROLE = "currentUserRole";
	public static final String CONTEXT_KEY_OPEN_ID = "currentOpenId";
	public static final String CONTEXT_KEY_REQUEST = "httpRequest";
	public static final String CONTEXT_KEY_VALIDATOR = "validators";
	public static final String CONTEXT_KEY_EXTRA_TOKEN = "extraNewToken";
	public static final String CONTEXT_KEY_RESPONSE = "currentResponse";
	public static final String CONTEXT_KEY_CLIENT_ID = "clientId";

	public static final String HTN_BINNER = "“混天凝”是一个以混凝土泵车为载体，集车辆销售、车辆运营。车辆后市场、供应链金融为核心业务的全国性混凝土泵车租赁服务平台，通过工业互联网以及大数据的帮助传统行业智能升级的高新技术企业。\n" +
			"“混天凝”将联动在建项目施工总包、车辆实现供需订单发布和双向抓取，及时满足工地对于混凝土泵车的服务需求;实时的掌握施工节点和行车信息，合理的统筹工程节点完成率，减少工期的拖延或临时赶工；支持款项在线日结、月结，解决结算难得问题 ，缓解供需双方资金压力。";

	public static final String SECRET_ID = "AKIDAvnTRAW5C4mT8gDMUTn0ylQDl32pup47";

	public static final String SECRET_KEY = "Tw9z7zdzBZllhNnzmgRzKyPbXEwPfeU5";
	public static final String REGION = "ap-beijing";

	/**
	 * 给前端返回的枚举类型
	 */
	@Getter
	public enum ResponseStatus {
		/**
		 * 基本枚举
		 */
		SUCCESS(1, "操作成功"),
		FAIL(0, "操作失败,请联系系统管理员"),
		VALIDATE_FAILED(2, "参数校验失败"),
		UNAUTHORIZED(401, "权限不足"),
		NO_ITEM_INFO(402, "您已经被项目经理移除"),

		CODE_ERROR(3, "验证码输入错误"),
		SYSTEM_ERROR(500, "系统错误"),
		RATE_LIMIT_ERROR(3001, "限流异常"),
		OCR_FAIL(100,""),
		UPDATE_FAIL(102,""),
		HAS_ORDER(101,"您所要删除的工长有进行中的订单，不能删除！"),
		ITEM_HAS_ORDER(103,"您所要完成的项目有进行中的订单，不能完成！"),
		UN_REGISTER(104,"该用户未注册！"),
		REGISTER_OTHER_ROLE(115,"该账号已有其他角色！"),
		INVITE_SUCCESS(105,"邀请成功！"),
		HAS_GOING_ORDER(106,"有进行中订单，无法删除！"),
		ORDER_STATUS_CHANGED(107,"订单状态发生改变，修改失败请重新修改"),
		HAS_GOING_ORDER_UPDATE(108,"有进行中订单，无法修改！"),
		NOT_OPEN_NO_ENABLE(109,"尚未开通平台接单，无法开启"),
		REPETE_NUM_OR_NAME(110,"您输入的手机号或者姓名重复，请重新输入！"),
		VEHICLE_DRIVER_COUNT_FULL(111,"该车的司机数量已经达到最大的限制"),
		//当前公司剩余额度不足本次下单，平台叫泵功能暂时关闭，请尽快充值，以免耽误工作
		BALANCE_NOT_ENOUGH(112,""),
		//邀请状态已经改变，请刷新页面
		INVITE_STATUS_CHANGE(113,"邀请状态已经改变，请刷新页面"),
		INVITE_FAIL(114,"邀请已经失效，加入失败！"),
		REPETE_INVITE(116,"已邀请过该用户，请勿重复邀请！"),
		USER_EXISTS(117,"该用户已存在，无需重复邀请！"),
		FZR(118,"负责人不能注销!"),
		ITEM_INVITE_CONCRETE_REPETE(119,"该搅拌站已经存在，请勿重复邀请!"),
		ITEM_NOT_EXISTS(120,"该项目不存在"),
		LINKMAN_NOT_EXISTS(121,"该联系人不存在"),
		CONCRETE_NOT_EXISTS(122,"该搅拌站已经不是该项目的混凝土供应方"),
		STUDY_NOT_CONPLETE(123,"学习视频进度未完成，不能修改为接单中"),
		BAN_DRIVER_MESSAGE(124,"该司机被封禁，无法上车！"),
		ONLY_ONE_DRIVER(125,"当前车辆工作中的司机只剩一个，不能下车！"),

		/**
		 * 用户相关枚举
		 */
		USER_IS_EXIST(10001, "该用户已注册"),
		USER_IS_NOT_ENABLE(10002, "该用户已被禁用"),
		USERNAME_ORE_PASSWORD_ERROR(10003, "用户名或密码错误"),
		USERNAME_IS_NOT_EXIST(10004, "该账号不存在"),
		FOREMAN_IS_NOT_ITEM(10005, "工长没有项目，不能登陆"),


		ROLE_IS_EXIST(10004, "该角色名已存在"),

		/**
		 * 订单
		 */
		ORDER_REQUEST_VEHICLE_IS_ERROR(20001, "请选择订单需求中正确的车辆！！！"),
		/**
		 * 司机
		 */
		DRIVER_IS_EXIST(30001, "司机已经存在");

		private Integer code;
		private String message;

		ResponseStatus(Integer code, String message) {
			this.code = code;
			this.message = message;
		}

		public static ResponseStatus getByCode(int code) {
			for (ResponseStatus resultEnum : ResponseStatus.values()) {
				if (code == resultEnum.getCode()) {
					return resultEnum;
				}
			}
			return null;
		}
	}

	public static final String USER_ENABLED = "";

	public static final String UN_AUDIT = "未认证";

	public static final String AUDIT_ING = "审核中";

	public static final String AUDIT_COMPLETE = "审核通过";

	public static final String AUDIT_FAILURE = "审核拒绝";

	public static final String UN_ARRIVED = "未到达现场";

	public static final String ARRIVED = "已到达现场";

	public static final String COMPLETED = "已完成";


	public static final String CANCELED = "订单已经取消，等待分配司机！";


	//司机状态
	public static final String DRIVER_FREE = "休息中";
	public static final String DRIVER_ACCEPT_ORDER = "接单中";
	public static final String DRIVER_WORK = "工作中";
	public static final String BAN_WORK = "封禁中";
	public static final String CHANGING_CARS = "换车中";
	//车辆状态
	public static final String VEHICLE_FREE = "空闲中";
	public static final String VEHICLE_WORK = "工作中";
	public static final String VEHICLE_EXPIRATION = "车辆到期";
	//订单关联的车辆状态
	public static final String ORDER_VEHICLE_IN = "进行中";
	public static final String ORDER_VEHICLE_COMPLETE = "已完成";
	public static final String ORDER_VEHICLE_CANCEL = "已取消";

	public static final String FACEID_ENDPOINT = "faceid.tencentcloudapi.com";


	public static final String CLOCK_NEWS = "订单即将开始，请尽快赶往施工地点并打开开始！";


	public static final String BACK = "BACK";
	public static final String FRONT = "FRONT";

	/**
	 * 验证码有效期（分钟）
	 */
	public static final Integer CODE_EXPIRATION = 6000;

	/**
	 * 验证码有效期（分钟）
	 */
	public static final Long WXCODE_EXPIRATION = 6000L;



	/**
	 * 抢单中
	 */
	public static final  int grabbing = 0;

	/**
	 * 抢单成功
	 */
	public static final  int already = 1;


	/**
	 * 抢单失败
	 */
	public static final  int falure = 2;


	/**
	 * 同车人员抢单中
	 */
	public static final  int matedrivergrabbing = 5;



	//FOREMEN 微信发送服务信息的模板IDTEMPLATE_ID
	public final static String WX_FOREMEN_TEMP_ID = "qoAEuRKZ3IPmrBgmSVaRZlqC4aXHK95LkobPBWSTgoI";


	//PM 微信发送服务信息的模板IDTEMPLATE_ID
	public final static String WX_PM_PROCESS_TEMP_ID = "rEZrZUEIVs-HJP8k2YRKZn7H9xh6JGfpDuUemnsPRPQ";

	public final static String WX_PM_TEMP_ID = "gCkbcOOoLJ_o9D7UPV5SOfIH6cgrb-yU2VxeO0j8dAM";



	public final static String WX_REQ_SUCC = "0";

	public final static String WX_GRANT_TYPE = "authorization_code";

	//小程序的id
	public final static String WX_APPID = "wx14e73b25654f2308";

	public final static String WX_APP_SECRET = "87ee49cc145db259320b69d037a60b7a";


	public final static String WX_ERROR_CODE = "40001";

	public final static String WX_TEMPLATE_ID = "uwR7Ud0Jp5wBmCkDTHO5Qk29b0tBUPY1GxKYsGp98oc";

	//微信发送服务信息的模板IDTEMPLATE_ID
	public final static String WX_DTEMPLATE_ID = "LqWi_pKiHRxsM9qTNyWwRjfUHVyjEZQ4MzwVhO3kw-s";

	public final static String WX_PUBLIC_APP_ID = "wx94eb025467b01f6a";

	public final static String WX_DOWN_URL = "http://weixin.qq.com/download";

	public final static String 	DISTRIBUTE_DRIVER ="分配司机：您好，您的订单已分配好司机，若订单有变化请尽快与调度联系";
	public final static String 	ALREADY_SETUP     ="已出发：司机已出发，您可以在小程序内查看司机位置";
	public final static String 	DRIVER_ARRIVED   ="已到达：司机已到达，请保持手机畅通，或主动联系司机";
	public final static String 	DRIVER_COMPLETED = "已完成：司机已完成工作，去给司机评价一下吧";
	public final static String 	DRIVERC_ANCELED	 ="已取消：您的订单已取消，欢迎您再次使用混天凝";
	public final static String 	DELAYING 		 ="延时中：司机因XXXXXX（延时原因），将会延后到达，给您造成不便望请谅解";
	//车辆牌照显示发生变化的子订单牌照，已分配显示所有子订单牌照



	public final static String  YES ="1";
	public final static String  NO ="0";


	public final static String  FORE_TYPE_0 ="0";

	public final static String  FORE_TYPE_1 ="1";




	//订单显示
	public final static String  ORDER_DISPLAY ="1";

	//订单隐藏
	public final static String  ORDER_HIDE ="0";


	////散户的项目ID设置为 散户专用项目
	public final static String  SANHU_ITEM ="4033086504365179998";


	////散户的项目ID设置为 散户专用项目
	public final static String  DEFAULT_STATISCICS ="default";


	public final static String  DAY_STATISCICS ="day";

	public final static String  WEEK_STATISCICS ="week";

	public final static String  MONTH_STATISCICS ="month";


	//搅拌站：
	public final static String  CONCRETE_APPID ="wxe46ad99927b873cd";


	//搅拌站：
	public final static String  CONCRETE_SECRET ="fda6d9b11f3c72b6ba1245c257dac7db";



	//验厂：
	public final static String  SALE_APPID ="wx69aa388ff3c2d910";


	//验厂：
	public final static String  SALE_APP_SECRET ="86db86e50be07be55a7e36c977330bac";


	//上报：
	public final static String  TPSP_APPID ="wxd153b55ca1fa79f2";


	//上报：
	public final static String  TPSP_APP_SECRET ="1dcd840b3bd613378bdfe79e0f6db67b";


	//易联云
	public final static String  YLW_CLIENT_ID ="1055600264";

	public final static String  YLW_CLIENT_SECRET="bbb4cbeb26efaafaa17671f0774a6da3";

	//易联云
	public final static String  YLW_ACCESS_TOKEN ="3c2d5babf7a14c32b7af2ef407097230";
	//易联云
	public final static String  YLW_MACHINE_CODE ="4004761524";
	//易联云
	public final static String  YLW_SIGN ="2d8a039cd4b2de2561a4b8c6c6e5ad71";
	//易联云
	public final static String  YLW_ID ="3F2504E0-4F89-11D3-9A0C-0305E82C3301";

	//易联云
	public final static String  YLW_TIMESTAMP ="3F2504E0-4F89-11D3-9A0C-0305E82C3301";


	//易联云
	public final static String  HTN_CONCRETE ="sys_concrete_type";











}
